﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel.DataAnnotations;

namespace UIGenDemoModel
{
    public class UserDetails
    {
        public const string KEY_USER = "Logon Details";

        #region UserName
        private string _username = string.Empty;
        /// <summary>
        /// UserName
        /// </summary>
        [Display(Name = "User Name", GroupName = KEY_USER, Order = 1, Description = "user Name/ Id")]
        public string UserName
        {
            get { return _username; }
            set { _username = value; }
        }

        #endregion UserName 

        
        #region Password
        private string _password; //= new string();
        /// <summary>
        /// Password
        /// </summary>
        [Display(Name = "Password", GroupName = KEY_USER, Order = 2, Description = "password")]
        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }

        #endregion Password 

        public override string ToString()
        {
            return string.IsNullOrEmpty(_username) == true || string.IsNullOrEmpty(_username) == true
                ? "Please enter user name and password."
                : "logon details for " + _username;
        }

    }
}
